<?xml version="1.0" encoding="UTF-8" ?>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
"http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">

<html xmlns="http://www.w3.org/1999/xhtml"
	xmlns:ui="http://java.sun.com/jsf/facelets"
	xmlns:h="http://java.sun.com/jsf/html"
	xmlns:p="http://primefaces.org/ui"
	xmlns:f="http://java.sun.com/jsf/core">

<h:head>
	<title>Employee Location</title>

	<link
		href="#{facesContext.externalContext.requestContextPath}/resources/css/site/style.css"
		rel="stylesheet" type="text/css" />
	<link
		href="#{facesContext.externalContext.requestContextPath}/resources/css/site/navi.css"
		rel="stylesheet" type="text/css" />

	<script type="text/javascript"
		src="#{facesContext.externalContext.requestContextPath}/resources/css/site/js/jquery-1.8.3.min.js"></script>

	<meta http-equiv="Content-Type" content="text/html; charset=UTF-8" />
	<script type="text/javascript">
		$(function() {
			$(".box .h_title").not(this).next("ul").hide("normal");
			$(".box .h_title").not(this).next("#records").show("normal");
			$(".box").children(".h_title").click(function() {
				$(this).next("ul").slideToggle();
			});
			//$("#hiddenForm:hiddenButton").css("display", "none);
		});
	</script>

	<h:outputScript library="javascript" name="jscodes.js" />

</h:head>

<h:body>
	<f:view contentType="text/html; charset=UTF-8" encoding="UTF-8">
		<div class="wrap">
			<div id="header">
				<ui:include src="../templates/top.xhtml"></ui:include>
			</div>

			<div id="content">
				<div id="sidebar">
					<ui:include src="../templates/left.xhtml"></ui:include>
				</div>
				<div id="main">
					<div class="clear"></div>
					<h:form id="form">
						<p:growl id="growl" showDetail="true" life="5000" />
						<!-- <div class="full_w">
						<h:panelGrid columns="2" cellpadding="5">
							<f:facet name="footer">
								<p:commandButton action="#{rec140MB.importRecords}"
									update="rec140Table growl" ajax="true" value="Import Records"></p:commandButton>


								<p:commandButton action="#{rec140MB.exportRecords}"
									update="growl" ajax="true" value="Export Records"></p:commandButton>
									
								<p:commandButton id="getDownload"  value="Download File" action="#{rec140MB.download}"></p:commandButton >	
							</f:facet>
						</h:panelGrid>
					</div> -->
						<div class="full_w">
							<h:panelGrid columns="2" cellpadding="5">
								<f:facet name="footer">
								&nbsp; &nbsp; Process Id :
							<h:selectOneMenu value="#{rec140MB.selectedProcessId}">
										<f:selectItem itemLabel="Select One" itemValue="-1" />
										<f:selectItems value="#{rec140MB.processList}" />
									</h:selectOneMenu>
							&nbsp; &nbsp; &nbsp;
							<p:commandButton action="#{rec140MB.getSelectedProcessRecords}"
										id="reloadSpecificData" value="Reload Specific Data"
										update="rec140Table growl" ajax="true"></p:commandButton>
								</f:facet>
							</h:panelGrid>
						</div>

						<div class="full_w">
							<h1>Employee Locations</h1>
							<p:dataTable id="rec140Table" value="#{rec140MB.records}"
								var="user" style="width:700px;" lazy="true"
								emptyMessage="#{bundle.noRecords}" paginator="true" rows="10"
								paginatorTemplate="{CurrentPageReport}  {FirstPageLink} {PreviousPageLink} {PageLinks} {NextPageLink} {LastPageLink} {RowsPerPageDropdown}"
								rowsPerPageTemplate="5,10,15,20,25" scrollable="true"
								scrollWidth="700" scrollHeight="200" rowIndexVar="rowIndex">

								<p:column headerText="Record Id" footerText="Record Id" width="50">
									<h:outputText value="#{rowIndex+1}" />
								</p:column>

								<p:column headerText="Record Type" footerText="Record Type"
									width="125">
									<h:outputText value="#{user.rectype}" />
								</p:column>

								<p:column headerText="Company Code" footerText="Company Code"
									width="100">
									<h:outputText value="#{user.cocode}" />
								</p:column>

								<p:column headerText="TCI Id" footerText="TCI Id" width="50">
									<h:outputText value="#{user.tci_id}" />
								</p:column>

								<p:column headerText="Location Number"
									footerText="Location Number" width="100">
									<h:outputText value="#{user.wotclocnumber}" />
								</p:column>

								<p:column headerText="Location Name" footerText="Location Name"
									width="150">
									<h:outputText value="#{user.wotclocname}" />
								</p:column>

								<p:column headerText="Address 1" footerText="Address 1"
									width="250">
									<h:outputText value="#{user.wotclocaddr_1}" />
								</p:column>

								<p:column headerText="Address 2" footerText="Address 2"
									width="225">
									<h:outputText value="#{user.wotclocaddr_2}" />
								</p:column>

								<p:column headerText="City" footerText="City" width="100">
									<h:outputText value="#{user.wotcloccity_1}" />
								</p:column>

								<p:column headerText="State" footerText="State" width="100">
									<h:outputText value="#{user.wotclocstate_1}" />
								</p:column>

								<p:column headerText="Zip" footerText="Zip" width="70">
									<h:outputText value="#{user.wotcloczip_1}" />
								</p:column>

								<p:column headerText="Country" footerText="Country" width="70">
									<h:outputText value="#{user.wotcloccountry_1}" />
								</p:column>

								<p:column headerText="wotclocfein" footerText="wotclocfein"
									width="70">
									<h:outputText value="#{user.wotclocfein}" />
								</p:column>

								<p:column headerText="wotclocstscd" footerText="wotclocstscd"
									width="85">
									<h:outputText value="#{user.wotclocstscd}" />
								</p:column>

								<p:column headerText="wotclocphnumber"
									footerText="wotclocphnumber" width="100">
									<h:outputText value="#{user.wotclocphnumber}" />
								</p:column>

								<p:column headerText="wotclocrptlvl_1"
									footerText="wotclocrptlvl_1" width="85">
									<h:outputText value="#{user.wotclocrptlvl_1}" />
								</p:column>

								<p:column headerText="wotclocrptlvl_2"
									footerText="wotclocrptlvl_2" width="85">
									<h:outputText value="#{user.wotclocrptlvl_2}" />
								</p:column>

								<p:column headerText="wotclocrptlvl_3"
									footerText="wotclocrptlvl_3" width="85">
									<h:outputText value="#{user.wotclocrptlvl_3}" />
								</p:column>

								<p:column headerText="wotclocrptlvl_4"
									footerText="wotclocrptlvl_4" width="85">
									<h:outputText value="#{user.wotclocrptlvl_4}" />
								</p:column>

								<p:column headerText="wotclocrptlvl_5"
									footerText="wotclocrptlvl_5" width="85">
									<h:outputText value="#{user.wotclocrptlvl_5}" />
								</p:column>

								<p:column headerText="wotclocrptlvl_6"
									footerText="wotclocrptlvl_6" width="85">
									<h:outputText value="#{user.wotclocrptlvl_6}" />
								</p:column>

								<p:column headerText="wotclocrptlvl_7"
									footerText="wotclocrptlvl_7" width="85">
									<h:outputText value="#{user.wotclocrptlvl_7}" />
								</p:column>

								<p:column headerText="wotclocrptlvl_8"
									footerText="wotclocrptlvl_8" width="85">
									<h:outputText value="#{user.wotclocrptlvl_8}" />
								</p:column>

								<p:column headerText="wotcfacilitybegindt"
									footerText="wotcfacilitybegindt" width="100">
									<h:outputText value="#{user.wotcfacilitybegindt}" />
								</p:column>

								<p:column headerText="wotcfacilityceasedt"
									footerText="wotcfacilityceasedt" width="100">
									<h:outputText value="#{user.wotcfacilityceasedt}" />
								</p:column>

								<p:column headerText="Finalized" footerText="Finalized"
									width="70">
									<h:outputText value="#{user.finalized}" />
								</p:column>
							</p:dataTable>
						</div>
					</h:form>
				</div>
				<div class="clear"></div>
			</div>

			<div id="footer">
				<ui:include src="../templates/footer.xhtml"></ui:include>
			</div>
		</div>

	</f:view>
</h:body>
</html>